/**
 * Copyright &copy; 2012-2016 <a href="https://www.kaaction.com">KAA</a> All rights reserved All rights reserved.
 */
package com.kaaction.modules.market.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.kaaction.common.persistence.DataEntity;

/**
 * 活动Entity
 * @author zengbiao
 * @version 2017-04-22
 */
public class EventLottery extends DataEntity<EventLottery> {
	
	private static final long serialVersionUID = 1L;
	private Event event;		// event_id 父类
	private String name;		// 奖品名称
	private String quantity;		// 奖品总数
	private double weight;		// 概率比
	private String image;		// 封面
	private String quantityLeft;		// 剩下的奖品数量
	
	public EventLottery() {
		super();
	}

	public EventLottery(String id){
		super(id);
	}

	public EventLottery(Event event){
		this.event = event;
	}

	@Length(min=1, max=64, message="event_id长度必须介于 1 和 64 之间")
	public Event getEvent() {
		return event;
	}

	public void setEvent(Event event) {
		this.event = event;
	}
	
	@Length(min=1, max=100, message="奖品名称长度必须介于 1 和 100 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=45, message="奖品总数长度必须介于 1 和 45 之间")
	public String getQuantity() {
		return quantity;
	}

	public void setQuantity(String quantity) {
		this.quantity = quantity;
	}
	
	@NotNull(message="概率比不能为空")
	public double getWeight() {
		return weight;
	}

	public void setWeight(double weight) {
		this.weight = weight;
	}
	
	@Length(min=1, max=100, message="封面长度必须介于 1 和 100 之间")
	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}
	
	@Length(min=0, max=11, message="剩下的奖品数量长度必须介于 0 和 11 之间")
	public String getQuantityLeft() {
		return quantityLeft;
	}

	public void setQuantityLeft(String quantityLeft) {
		this.quantityLeft = quantityLeft;
	}
	
}